#include<bits/stdc++.h>
using namespace std;
string sub(string&s1,string&s2)
{
    string ret;
    char flag='+';
    int sz1=s1.size();
    int sz2=s2.size();
    if(sz1<sz2||(sz1==sz2&&s2>s1))
    {
        s1.swap(s2);
        flag='-';
        swap(sz1,sz2);
    }
    reverse(s1.begin(),s1.end());
    reverse(s2.begin(),s2.end());
    int count=0;
    for(int i=0;i<sz1;i++)
    {
        int tem1=s1[i]-'0'-count;
        int tem2=i<sz2?s2[i]-'0':0;
        if(tem1>=tem2) 
        {
            ret.push_back(tem1-tem2+'0');
            count=0;
        }
        else
        {
            //代表向前借位
            ret.push_back(tem1-tem2+10+'0');
            count=1;
        }
    }
    while(ret.size()>1&&ret[ret.size()-1]=='0') ret.pop_back();
    reverse(ret.begin(),ret.end());
    if(flag=='-') ret=flag+ret;
    return ret;
}




int main()
{
    string s1,s2;
    cin>>s1>>s2;
    cout<<sub(s1,s2);
    return 0;
}
